<?php
include("../include/header.inc.php");

include('../Include/functions.inc.php');
?>
<div data-role="page" id="home">
    <!-- Header -->
    <?php
       include("../Include/banner.inc.php")
    ?>

    <div data-role="content">
        <?php
            $id = $_GET['id'];
            $name = getThematiqueName($id, $_COOKIE['lang']);
            $name = mysql_fetch_array($name);
            
        ?>
        <h2><?php echo $textes['oeuvres_pour'][$_COOKIE['lang']] . " " . htmlentities(mysql_escape_string($name[0])); ?></h2>
        
        <ul class="ui-listview ui-listview-inset ui-corner-all ui-shadow" data-inset="true" data-role="listview">
            <?php
                $listeOeuvres = getAllOeuvresFromThematique($id,$_COOKIE['lang']);
                
                //Parcours les thematiques et les affiche
                while($ligne = mysql_fetch_array($listeOeuvres))
                {
                    echo "<li class='ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-corner-top ui-btn-up-c' data-theme='c'>\n";
                    echo "<a class='ui-link-inherit' href='/Rilke/Oeuvres/infosOeuvre.php?id=$ligne[0]' target='_self'>";
                    echo "<div class='ui-li ui-corner-top' aria-hidden='true'>\n";
                    echo "<div id='picture'><img class='align_left' src='../Include/images/oeuvres/$ligne[2].png'></img></div>";
                    echo "<div class='ui-btn-text'>\n";
                    echo $ligne[1] ."</a>";
                    echo " </div>\n</div>\n</li>";
                }
            ?>    
        </ul>
        
    </div>
        <!-- Footer -->
    <?php
    include("../Include/footer.inc.php")
    ?>
</div>